Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>X BitMap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/X_BitMap"> <link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-X_BitMap rootpage-X_BitMap skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">X BitMap</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr"><div class="infobox_v3 infobox infobox--frwiki noarchive large"><div class="entete icon informatique" style="background-color:#C0C0C0"><div>XBM<br><small><i>X BitMap</i></small><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}


/* end https://fr.wikipedia.org/ */
</style></div></div><table><caption style="text-align:center;background-color:#C0C0C0">Caractéristiques</caption><tbody><tr class=""><th scope="row"><a href="Extension_de_nom_de_fichier" title="Extension de nom de fichier">Extension</a></th><td class=""><div>
<span class="wd_p1195"><code>.xbm</code></span></div></td></tr><tr class=""><th scope="row"><a href="Type_de_m%C3%A9dias" title="Type de médias">Type MIME</a></th><td class=""><div>
<span class="wd_p1163"><code> image/x-xbitmap</code></span></div></td></tr><tr class=""><th scope="row"><a href="Base_PRONOM" title="Base PRONOM">PUID</a></th><td class=""><div>
<span class="wd_p2748"><a rel="nofollow" class="external text" href="https://www.nationalarchives.gov.uk/pronom/x-fmt/299">x-fmt/299</a>, <a rel="nofollow" class="external text" href="https://www.nationalarchives.gov.uk/pronom/x-fmt/207">x-fmt/207</a></span></div></td></tr><tr class=""><th scope="row"><a href="Nombre_magique_(programmation)" title="Nombre magique (programmation)">Signature</a></th><td class=""><div>
<span class="wd_p4152"><code>23 64 65 66 69 6E 65 20</code> (<a href="Syst%C3%A8me_hexad%C3%A9cimal" title="Système hexadécimal">hexa</a>)</span></div></td></tr><tr class=""><th scope="row">Version initiale</th><td class=""><div>
<span class="wd_p571"><time datetime="1989" data-sort-value="1989" class="date-lien"><a href="1989" title="1989">1989</a></time></span></div></td></tr><tr class=""><th scope="row">Type de format</th><td class=""><div>
<a href="Format_de_donn%C3%A9e" class="mw-redirect" title="Format de donnée">Format</a> d'<a href="Image" title="Image">image</a> monochrome</div></td></tr></tbody></table></div>
<p><b>X BitMap</b>, <a href="Abr%C3%A9viation" title="Abréviation">abrégé</a> <b>XBM</b>, est un <a href="Format_de_donn%C3%A9e" class="mw-redirect" title="Format de donnée">format</a> d'<a href="Image_num%C3%A9rique" title="Image numérique">image numérique</a> monochrome originellement conçu pour le <a href="X_Window_System" title="X Window System">système X Window</a>, notamment pour les images de pointeur et d'<a href="Ic%C3%B4ne_(informatique)" title="Icône (informatique)">icône</a>.
</p><p>Le format XBM décrit les images en <a href="Langage_C" class="mw-redirect" title="Langage C">langage C</a>, ce qui permet à un <a href="Programmation" class="mw-redirect" title="Programmation">programmeur</a> d'intégrer très facilement des images XBM à un <a href="Logiciel" title="Logiciel">logiciel</a> écrit en C. L'image d'un pointeur est écrite comme suit au format XBM&nbsp;:
</p><p>Texte d'un pointeur au format XBM (voir Media:Pointeur.xbm)&nbsp;:
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#define pointeur_width 11</span>
<span class="cp">#define pointeur_height 16</span>
<span class="cp">#define pointeur_x_hot 0</span>
<span class="cp">#define pointeur_y_hot 0</span>
<span class="k">static</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">pointeur_bits</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="mh">0x01</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x03</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x07</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x0f</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x1f</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x3f</span><span class="p">,</span>
<span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x7f</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0xff</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0xff</span><span class="p">,</span><span class="w"> </span><span class="mh">0x01</span><span class="p">,</span><span class="w"> </span><span class="mh">0xff</span><span class="p">,</span><span class="w"> </span><span class="mh">0x03</span><span class="p">,</span><span class="w"> </span><span class="mh">0xff</span><span class="p">,</span><span class="w"> </span><span class="mh">0x07</span><span class="p">,</span>
<span class="w"> </span><span class="mh">0x3f</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x33</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x61</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0x60</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="p">,</span><span class="w"> </span><span class="mh">0xc0</span><span class="p">,</span><span class="w"> </span><span class="mh">0x00</span><span class="w"> </span><span class="p">};</span>
</pre></div>
<p>Les deux premières lignes définissent la largeur et la hauteur de l'image (11 par 16) en <a href="Pixel" title="Pixel">pixels</a>. Les deux lignes suivantes sont optionnelles et définissent la position d'un éventuel pixel de pointage dans l'image (coordonnée (0;0) soit en haut à gauche au bout de la flèche). Les dernières lignes contiennent un tableau d'<a href="Octet" title="Octet">octets</a> (ici représentés par le type <code>unsigned char</code>) dont les <a href="Bit_(informatique)" class="mw-redirect" title="Bit (informatique)">bits</a> représentent les pixels de l'image, suivant l'organisation <a href="Endianess" class="mw-redirect" title="Endianess">little-endian</a>.
</p><p>Ce format est avec <a href="Graphics_Interchange_Format" title="Graphics Interchange Format">GIF</a> le premier à avoir été utilisable dans les <a href="Page_web" title="Page web">pages web</a>. Comme il est obsolète, son support est progressivement retiré des <a href="Navigateur_web" title="Navigateur web">navigateurs Web</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Référence"><span id="R.C3.A9f.C3.A9rence"></span>Référence</h2></div>
<p><i>Xlib - C Language X Interface, X Consortium Standard, X Version 11, Release 6.4</i>, chapitre 16.9.
</p>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de l’imagerie numérique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2021-10-08" href="https://fr.wikipedia.org/wiki/?title=X_BitMap&amp;oldid=186985546">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>